void main() {
    Person person = Person('张三',13);
    print(person.toString());
    Student student=Student('清华','张三',19,city:'张家口',country:'日本');
    student._school = '985';
    print(student.toString());
}

/// 定义一个dart类

 class Person {
 String? name;
 int? age;
 Person(this.name,this.age);
 @override
  String toString() {
    return 'name:$name  age:$age';
  }
 }

 class Student extends Person{
    // 定位变量
   String? _school; //私有变量作用域时当前文件
   String? city;
   String? country;
   String? funName;
   Student(this._school,String? name,int? age,{this.city,this.country='China'})
   : funName = '$country.$city', super(name, age){
     /// 构造方法体不是必须的
   }
   @override
   String toString() {
    // TODO: implement toString
    return 'name:$name school:$_school  city:$city country:$country ${super.toString()}';
  }
 }